<?php

error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
require_once("../config.php");
?>
<script type="text/javascript" src="../lib/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../lib/jquery.jOrgChart.js "></script>
<link rel="stylesheet" href="../lib/jquery.jOrgChart.css"/>
<script>
jQuery(document).ready(function() {
        $("#org").jOrgChart({
		dragAndDrop  : false
        });
	});
</script>
<ul id="org" align="center" style="display:none">
    <li>Food
	<ul>
	    <li>Beer</li>
	    <li>Vegetables
		<ul>
		    <li>Pumpkin</li>
		    <li>Aubergine</li>
		</ul>
	    </li>
	    <li>Fruit
		<ul>
		    <li>Apple
			<ul>
			    <li>Granny Smith</li>
			</ul>
		    </li>
		    <li>Berries
			<ul>
			    <li>Blueberry</li>
			    <li>Raspberry</li>
			    <li>Cucumber</li>
			</ul>
		    </li>
		</ul>
	    </li>
	    <li>Bread</li>
	    <li>Chocolate
		<ul>
		    <li>Topdeck</li>
		    <li>Reese's Cups</li>
		</ul>
	    </li>
	</ul>
    </li>
</ul>
<?
/*$hierarchy = new Array();
require_once("../config.php");
$sql = "Select * from `hierarchy`";
$query = MySql::query($sql);
while ($row = mysql_fetch_object($query))
{
    $hierarchy[$row->_cid] = "Boss";
    $hierarchy[$row->_cid][$row->_id] = "Untergeordnet";
}
foreach($hierarchy as $vorgesetzter)
{
	echo "<li>";
	echo $vorgesetzter;
	echo "<ul>";
	foreach($vorgesetzter as $angestellter)
	{
		echo "<li>".$angestellter."</li>";
	}
	echo "</ul>";
	echo "</li>";
}*/
?>